﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using Mewdam.OAuth;

namespace Mewdam
{
    public partial class _Default : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            //consumer key
            //ulagogPCgxspCb2bxouyrw
            //consumer secret
            //s24vXeTkPi1WyKXuq3kXJg1FpOIU92x2FQSRfjcs

            MewdamOAuth mo = new MewdamOAuth();
            string authorizeUrl;
            authorizeUrl=mo.GetAuthorizeUrl(
                "ulagogPCgxspCb2bxouyrw", 
                "s24vXeTkPi1WyKXuq3kXJg1FpOIU92x2FQSRfjcs",
                "http://localhost:58585/Mewdam/callback.aspx");



            Response.Cookies["token"].Value=mo.Parameters.oauth_token;
            Response.Cookies["secret"].Value=mo.Parameters.oauth_token_secret;

            Response.Redirect(authorizeUrl);
        }
    }
}